From 299d1f328c2ad1475c8a1ac19b4fa07fc087d239 Mon Sep 17 00:00:00 2001 From: Trevor Parscal Date: Tue, 14 Jul 2009 17:39:00 +0000 Subject: [PATCH] More RTL fixes and also another fix to r52944 which broke the inclusion of common/IEFixes.js --- skins/Vector.php | 11 +++++++++++ skins/vector/main-ltr.css | 29 +++++++++++++++++++++++++---- skins/vector/main-rtl.css | 29 +++++++++++++++++++++++++---- 3 files changed, 61 insertions(+), 8 deletions(-) diff --git a/skins/Vector.php b/skins/Vector.php index d209a013eb..ee09e05a74 100644 --- a/skins/Vector.php +++ b/skins/Vector.php @@ -42,6 +42,17 @@ class SkinVector extends SkinTemplate { $wgStylePath . '/vector/csshover.htc")}' ); + // Append common IE fixes, which perhaps should be included in all + // skins, but for now it seems each skin needs to include them + // explicitly + $out->addScript( + '' + ); } /** * Builds a structured array of links used for tabs and menus diff --git a/skins/vector/main-ltr.css b/skins/vector/main-ltr.css index ee795a460a..29add94c75 100644 --- a/skins/vector/main-ltr.css +++ b/skins/vector/main-ltr.css @@ -21,7 +21,7 @@ body { margin: 0; padding: 0; font-family: sans-serif; - font-size: small; + font-size: 9.75pt; } body { background-color: #f3f3f3; @@ -190,14 +190,15 @@ div#head h5 { /* Variants and Actions */ /* @noflip */ div.vectorMenu { - float: left; direction: ltr; - } - div.vectorMenu { + float: left; background-image: url(images/arrow-down-icon.png); background-position: center center; background-repeat: no-repeat; } + body.rtl div.vectorMenu { + direction: rtl; + } /* @noflip */ div.vectorMenu h5 { float: left; @@ -220,6 +221,20 @@ div#head h5 { position: relative; display: none; clear: both; + text-align: left; + } + /* OVERRIDDEN BY COMPLIANT BROWSERS */ + body.rtl div.vectorMenu div.menu { + margin-right: 24px; + } + /* IGNORED BY IE6 */ + body.rtl div.vectorMenu > div.menu { + margin-right: auto; + } + /* Fixes old versions of FireFox */ + body.rtl div.vectorMenu > div.menu, + x:-moz-any-link { + margin-right: 24px; } div.vectorMenu:hover div.menu { display: block; @@ -233,6 +248,12 @@ div#head h5 { padding: 0; margin: 0; margin-left: -1px; + text-align: left; + } + /* Fixes old versions of FireFox */ + div.vectorMenu ul, + x:-moz-any-link { + min-width: 6em; } div.vectorMenu li { padding: 0; diff --git a/skins/vector/main-rtl.css b/skins/vector/main-rtl.css index 26017d895d..16dd225b08 100644 --- a/skins/vector/main-rtl.css +++ b/skins/vector/main-rtl.css @@ -21,7 +21,7 @@ body { margin: 0; padding: 0; font-family: sans-serif; - font-size: small; + font-size: 9.75pt; } body { background-color: #f3f3f3; @@ -190,14 +190,15 @@ div#head h5 { /* Variants and Actions */ /* @noflip */ div.vectorMenu { - float: left; direction: ltr; - } - div.vectorMenu { + float: left; background-image: url(images/arrow-down-icon.png); background-position: center center; background-repeat: no-repeat; } + body.rtl div.vectorMenu { + direction: rtl; + } /* @noflip */ div.vectorMenu h5 { float: left; @@ -220,6 +221,20 @@ div#head h5 { position: relative; display: none; clear: both; + text-align: right; + } + /* OVERRIDDEN BY COMPLIANT BROWSERS */ + body.rtl div.vectorMenu div.menu { + margin-left: 24px; + } + /* IGNORED BY IE6 */ + body.rtl div.vectorMenu > div.menu { + margin-left: auto; + } + /* Fixes old versions of FireFox */ + body.rtl div.vectorMenu > div.menu, + x:-moz-any-link { + margin-left: 24px; } div.vectorMenu:hover div.menu { display: block; @@ -233,6 +248,12 @@ div#head h5 { padding: 0; margin: 0; margin-right: -1px; + text-align: right; + } + /* Fixes old versions of FireFox */ + div.vectorMenu ul, + x:-moz-any-link { + min-width: 6em; } div.vectorMenu li { padding: 0; -- 2.20.1